package com.example.startupdemo;

import android.content.Context;
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.startup.Initializer;


import java.util.Arrays;
import java.util.List;

/**
 * @author: tuyrt7 on 2020/11/30.
 */
public class Sdk2Initializer implements Initializer<Sdk2> {

    @NonNull
    @Override
    public Sdk2 create(@NonNull Context context) {
        Log.e("startup", "Sdk2Initializer    create");
        Sdk2.init(context);
        return Sdk2.get();
    }

    @NonNull
    @Override
    public List<Class<? extends Initializer<?>>> dependencies() {
        Log.e("startup", "Sdk2Initializer    dependencies");
        //sdk2 需要 sdk1 初始化后再初始化
        return Arrays.asList(Sdk1Initializer.class);
    }
}

